﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewTrash.ascx.cs" Inherits="controls_admin_ViewTrash" %>
<!-- table -->
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Thùng Rác</h5>
        <div class="search">
            <div class="input">
            </div>
        </div>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <div id="divAction" class="first-action">
        <div>
            <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true" CssClass="select"
                OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
                <asp:ListItem Text="Xem theo chức năng" Value="0" />
                <asp:ListItem Text="Danh Mục" Value="1" />
                <asp:ListItem Text="Chương trình" Value="2" />
                <asp:ListItem Text="Shows" Value="3" />
                <asp:ListItem Text="Thành viên" Value="4" />
                <asp:ListItem Text="Sản phẩm" Value="5" />
                <asp:ListItem Text="Vé" Value="6" />
                <asp:ListItem Text="Tin tức" Value="7" />
                <asp:ListItem Text="Menu" Value="8" />
                <asp:ListItem Text="Quản Trị Viên" Value="9" />
                <asp:ListItem Text="Nhóm Quản Trị" Value="10" />
                <asp:ListItem Text="Modules" Value="11" />
                <asp:ListItem Text="Quảng cáo" Value="12" />
            </asp:DropDownList>
        </div>
        <div class="button">
            <asp:Button ID="Button1" runat="server" Text="Xóa chọn" OnClick="btnDeleteAll_Click" />
            <asp:Button ID="Button2" runat="server" Text="Khôi phục" OnClick="btnRestore_Click" />
        </div>
    </div>
    <!-- end box / title -->
    <div class="table">
        <table id="table-3">
            <thead>
                <tr>
                    <th>
                        STT
                    </th>
                    <th>
                        Tiêu đề
                    </th>
                    <th>
                        Danh mục
                    </th>
                    <th>
                        Ngày xóa
                    </th>
                    <th class="selected last">
                        <input type="checkbox" class="checkall" />
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rptData" runat="server" OnItemDataBound="rptData_ItemDataBound">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%#(Container.ItemIndex+1)+(base.Cur_page-1)*base.Page_size %>
                                <asp:HiddenField runat="server" ID="hdfID" Value='<%#Eval("ITEM_ID") %>' />
                            </td>
                            <td align="center">
                                <asp:Literal ID="ltrName" runat="server" Text='<%#Eval("ITEM_NAME")%>' />
                            </td>
                            <td align="center">
                                <asp:Literal ID="ltrCategory" runat="server" Text='<%#Eval("ITEM_CATEGORY")%>' />
                                <asp:HiddenField ID="hdfCate" runat="server" Value='<%#Eval("ITEM_CATEGORY")%>' />
                            </td>
                            <td align="center">
                                <%#LibraryO2S.O2S_DateTime.dd_MM_yyyy(Convert.ToDateTime( Eval("ITEM_CREATE_DATE")))%>
                            </td>
                            <td class="last" align="center">
                                <asp:CheckBox ID="cboSelect" runat="server" />
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
        <%--  <div class="pagination pagination-left last">
            <div class="pagerContainer" id="pagerContainer" runat="server">
            </div>
        </div>--%>
        <!-- table action -->
        <div class="action">
            <div class="button">
                <asp:Button ID="btnRestore" runat="server" Text="Khôi phục" OnClick="btnRestore_Click" />
                <asp:Button ID="btnDeleteAll" runat="server" Text="Xóa chọn" OnClick="btnDeleteAll_Click" />
            </div>
        </div>
        <!-- end table action -->
        <div style="text-align: center; margin: 10px">
            <%if (Session["url"] != null)
              {
                  if (Request.UrlReferrer != null)
                  {
                      if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                      {
                          Session["url"] = Request.UrlReferrer.ToString();                      
                  
            %>
            <a onclick="history.go(-1);" title="Trang trước">
                <%
}
                      else
                      {
                %>
                <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                    <%   
}
                  }
                  else
                  {                      
                    %>
                    <a onclick="history.go(-1);" title="Trang trước">
                        <%}
              }
              else
              {
                  if (Request.UrlReferrer != null)
                      Session.Add("url", Request.UrlReferrer.ToString());
                  else
                      Session.Add("url", Request.Url.ToString());
                        %>
                        <a href="default.aspx" title="Trang trước">
                            <%} %>
                            <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                        &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                            <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
        </div>
    </div>
</div>
<!-- end table -->
